<?php //pack11class

class ObjectCardNavigation extends Module {

    public function setup() {

        if(get_class($this->param)=="DekaroObject") {
            $object=$this->param;
        } else {
            return false;
        }

        $this->setID("ObjectCardNavigation");
        $info=new ObjectCardNavigationInfo;
        $info->setClass("ObjectCardHighLightItem");
        $info->setID("CardNavigation0");
        $this->addChild($info);

        $map=new ObjectCardNavigationMap;
        $map->setID("CardNavigation1");
        $this->addChild($map);

        $images=$object->getPhotos();
        $counter=2;
        usort($images, array("AdminObject","sortPhotos"));
        foreach($images as $image) {
            $item=new ObjectCardNavigationImage($image->value);
            $item->setID("CardNavigation".$counter);
            $this->addChild($item);
            $counter++;
        }

    }

}
?>
